package com.zelin.controller;

import com.zelin.pojo.Category;
import com.zelin.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("cate")
@RestController
public class CategoryController {
    @Autowired
    private CategoryService categoryService;
    @PostMapping("list")
    public List<Category> list(){
        return categoryService.findAll();
    }
}
